From: Ewan Mellor Date: Fri, 5 Jan 2007 15:38:01 +0000 (+0000) Subject: Record the last shutdown reason for each VM in the store. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15422^2~70 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=8787be2922d716b5c0edf8e8b970ffafbb439c8e;p=xen.git Record the last shutdown reason for each VM in the store. Signed-off-by: Ewan Mellor --- diff --git a/tools/python/xen/xend/XendConstants.py b/tools/python/xen/xend/XendConstants.py index e07fa127f1..e42216d06b 100644 --- a/tools/python/xen/xend/XendConstants.py +++ b/tools/python/xen/xend/XendConstants.py @@ -80,6 +80,7 @@ ZOMBIE_PREFIX = 'Zombie-' MINIMUM_RESTART_TIME = 20 RESTART_IN_PROGRESS = 'xend/restart_in_progress' +LAST_SHUTDOWN_REASON = 'xend/last_shutdown_reason' # # Device migration stages (eg. XendDomainInfo, XendCheckpoint, server.tpmif) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 8185d93576..b47083a885 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -969,6 +969,7 @@ class XendDomainInfo: log.warn('Domain has crashed: name=%s id=%d.', self.info['name_label'], self.domid) + self._writeVm(LAST_SHUTDOWN_REASON, 'crash') if xroot.get_enable_dump(): self.dumpCore() @@ -988,6 +989,7 @@ class XendDomainInfo: log.info('Domain has shutdown: name=%s id=%d reason=%s.', self.info['name_label'], self.domid, reason) + self._writeVm(LAST_SHUTDOWN_REASON, reason) self._clearRestart()